// 全局样式文件

// 变量定义
:root {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #c0c4cc;
  
  --border-base: #dcdfe6;
  --border-light: #e4e7ed;
  --border-lighter: #ebeef5;
  --border-extra-light: #f2f6fc;
  
  --background-base: #f5f7fa;
  --background-light: #fafafa;
}

// 通用工具类
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.p-10 {
  padding: 10px;
}

.p-20 {
  padding: 20px;
}

// 布局相关
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

// 响应式
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .card {
    padding: 15px;
  }
}

// Element Plus 样式覆盖
.el-header {
  background-color: white;
  border-bottom: 1px solid var(--border-light);
}

.el-aside {
  background-color: #001529;
  
  .el-menu {
    border-right: none;
  }
}

.el-main {
  background-color: var(--background-base);
  padding: 20px;
}

// 自定义组件样式
.page-container {
  min-height: calc(100vh - 60px);
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
  width: 400px;
  padding: 40px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-content {
  line-height: 1.8;
  
  h1, h2, h3, h4, h5, h6 {
    margin: 20px 0 10px 0;
    color: var(--text-primary);
  }
  
  p {
    margin-bottom: 15px;
    color: var(--text-regular);
  }
  
  img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
  }
  
  code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
  }
  
  pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
    
    code {
      background: none;
      padding: 0;
    }
  }
}
